import { axios } from "@/utils/request";

export function dietPlanListApi(parameter) {
  return axios({
    url: "/Recipes/GetPlanWeek",
    method: "get",
    params: parameter
  });
}

export function dietPlanDetailApi(parameter) {
  return axios({
    url: "/Recipes/GetPlanWeekDetail",
    method: "get",
    params: parameter
  });
}

// 新增
export function addDietPlanApi(data) {
  return axios({
    url: "/Recipes/SavePlanWeek",
    method: "post",
    data
  });
}

export function deleteDietPlanApi(params) {
  return axios({
    url: "/Recipes/DeletePlan",
    method: "post",
    params
  });
}

export function getDayPurchase(parameter) {
  return axios({
    url: "/Recipes/DayPurchase",
    method: "get",
    params:parameter
  });
}


export function getWeekPurchase(id) {
  return axios({
    url: `/Recipes/WeekPurchaseV2?PlanWeekRecipesId=${id}`,
    method: "get"
  });
}